<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>宽度自适应两列布局</title>
        <style>
            *{margin:0;padding:0;}
            #herder{
                height:50px;
                background:blue;
            }
            .main-left{
                width:30%;
                height:800px;
                background:red;
                float:left;
            }
            .main-right{
                width:70%;
                height:800px;
                background:pink;
                float:right;
            }
            #footer{
                clear:both;
                height:50px;
                background:gray;
            }
        </style>
    </head>
    <body>
        <div id="herder">页头</div>
        <div class="main-left">左列</div>
        <div class="main-right">右列</div>
        <div id="footer">页脚</div>
    </body>
</html>